<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
<title></title>
</head>
<body>
<script type="text/javascript">
function check(){
	var answer1;
	var menpai = document.getElementsByName('menpai');
	for(var i=0; i<menpai.length; i++){
		if(menpai[i].checked){
			answer1=menpai[i].value;
		}
	}
	if(!answer1){
	    alert("请选择答案");
    }else if(answer1=="B"){
		alert("答案正确");
	}else{
		alert("答案不正确");
	}
}
</script>
  <h3>在《天龙八部》中，虚竹是______派的掌门？</h3>
  <input type="radio" name="menpai" value="A">A 星宿&nbsp;&nbsp;
  <input type="radio" name="menpai" value="B">B 逍遥&nbsp;&nbsp;
  <input type="radio" name="menpai" value="C">C 少林&nbsp;&nbsp;
  <input type="radio" name="menpai" value="D">D 天山
  <br>
  <p><input type="button" name="but" value="提交答案" onClick="check()">
</body>
</html>
